part of 'course_page_bloc.dart';

abstract class CoursePageEvent extends Equatable {
  const CoursePageEvent();

  @override
  List<Object> get props => [];
}

/// 预请求多个接口
class CoursePageFetchDataInitial extends CoursePageEvent {
  final CoursePageBanner banner;
  final CoursePageMap map;
  final CoursePageFetchData course;
  final CompletableAction action;

  CoursePageFetchDataInitial({this.banner, this.map, this.course, this.action});

  @override
  List<Object> get props => [this.banner, this.map, this.course, action];
}

/// 获取轮播图
class CoursePageBanner extends CoursePageEvent {
  final String code;
  final CompletableAction action;
  CoursePageBanner(this.code, {this.action});

  @override
  List<Object> get props => [code, action];
}

/// 获取全局字典，
/// 筛选中适应症、授课形式和课程班型从字典里面获取
/// 需要缓存到本地
class CoursePageMap extends CoursePageEvent {
  final CompletableAction action;
  CoursePageMap({this.action});

  @override
  List<Object> get props => [action];
}

/// 获取课程
class CoursePageFetchData extends CoursePageEvent {
  final String campusId; //  中心id
  final String city; // 城市（不传或为空查全部）
  final String code; //   配置类型（比如查为你推荐/专家评估/名师讲座等）
  final int isonline; //  形式（是否线上课程 0线下/1线上）
  final String tagId; //  科目id
  final String typeId; //   标签id
  final List<String> productIds;

  final CompletableAction action;

  CoursePageFetchData(
      {this.campusId,
      this.city,
      this.code,
      this.isonline,
      this.tagId,
      this.typeId,
      this.productIds,
      this.action});

  @override
  List<Object> get props => [code, action];
}
